package org.cerberus.platform.internal.impl;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import org.cerberus.platform.internal.IProtocol;
import org.cerberus.platform.internal.IProtocolHandler;
import org.cerberus.platform.internal.domain.IComponentClass;


public class BinaryProtocol implements IProtocolHandler {

	public static final String PROTOCOL_ID = "binary";
	
	@Override
	public String getProtocolID() {
		return PROTOCOL_ID;
	}

	@Override
	public void read(InputStream out, IProtocol callback)
			throws IOException {
	}

	@Override
	public IProtocol write(OutputStream out) {
		return new ProtocolWriter(out);
	}
	
	private static class ProtocolWriter implements IProtocol {
		private OutputStream stream;
		
		public ProtocolWriter(OutputStream stream) {
			this.stream = stream;
		}
		@Override
		public void restore() throws IOException {
			
		}
		@Override
		public void change(Integer hash, int index, int attributeCount,
				Object value) {
		}
		@Override
		public void command(int commandID) throws IOException {
		}
		@Override
		public void newClass(IComponentClass clazz) {
		}
		@Override
		public void newObject(Object[] object) {
		}
		@Override
		public void removeClass(String classID) {
		}
		@Override
		public void removeObject(Integer id) {
		}
		@Override
		public void parameter(String key, String value) {
			
		}
	}
	
	
}
